export const parseDateFormat = (data: any, format?: string) => {
  Object.keys(data).forEach((key: string) => {
    if (key.startsWith("[") && key.endsWith("]") && Array.isArray(data[key])) {
      const [startTime, endTime] = key.substring(1, key.length - 1).split(",");
      if (data[key][0]&&data[key][1]) {
        // @TODU 可以配置
        data[startTime] = data[key][0].format(format ? format : "YYYY-MM-DD 00:00:00");
        data[endTime] = data[key][1].format(format ? format : "YYYY-MM-DD 23:59:59");
      }
      delete data[key];

    }
  });
  return data;
};